package com.cip.admin.service.impl;

import java.util.List;
import com.cip.admin.model.Chat;
import com.cip.admin.service.ChatService;
import com.cip.admin.dao.ChatDAO;


public class ChatServiceImpl implements ChatService {
	
	private ChatDAO chatDAO;
	
	public void saveOrUpdateChat(Chat chat)	throws Exception {
		chatDAO.saveOrUpdateChat(chat);
	}
	
	public List<Chat> getAllChats(String chatTo) throws Exception{
		return chatDAO.getAllChats(chatTo);
	}
	
	public ChatDAO getChatDAO() {
		return chatDAO;
	}
	public void setChatDAO(ChatDAO chatDAO) {
		this.chatDAO = chatDAO;
	}	
}
